Method for managing spare blocks of an optical disc

ABSTRACT

A method for defect management of an optical disc. The optical disc includes a plurality of data blocks and a plurality of spare blocks, each data block is for recording data, each spare block is for replacing a defect data block to record a data. The method includesrecording a status of the spare blocks in a status table according to a location order of the spare blocks, such that the statuses of neighboring spare blocks with different statuses are recording in neighboring items of the status table.

BACKGROUND OF INVENTION

[0001] 1. Field of Invention

[0002] A method for managing the spare blocks of an optical disc, moreparticularly one based on using the spare block address to access thespare block usage status.

[0003] 2. Description of the Prior Art

[0004] Because an optical disc is inexpensive, compact, light in weight,and can store a huge amount of data, optical discs are becoming the mostfrequently used data storage media in the modern information society.With the introduction of a writable optical disc allowing each user towrite his or her own data onto the optical disc to meet personal needs,the optical disc is becoming one of the most important portable personalstorage media. How to access data on the writable optical disc morereliably and more efficiently is now a focal point of research in themodern information industry.

[0005] An optical disc drive is necessary to access data on the opticaldisc. Please refer to FIG. 1. FIG. 1 is a functional block diagram of atypical optical disc drive 10 that is used to access an optical disc 22.There is a loader 14 to hold the optical disc 22 in the optical discdrive 10, one motor 12 that spins the loader 14, a control circuit 18that controls operation of the optical disc drive 10, and a memory 20(such as a volatile random access memory) to temporarily hold the dataneeded by the controlling circuit 18 during an operational period. Theoptical disc 22 has tracks 24 to record data. After the optical disc 22is put on the loader 14, the motor 12 will drive the loader 14 and thetracks 24 on the optical disc 22 will rotate across a pick-up head 16.Using the pick-up head 16, the control circuit 18 can access the data onthe tracks 24. The control circuit 18 is controlled by a host 26 toaccess data on the optical disc 22. The host 26 can be a computer systemsuch as PC.

[0006] To make the recording of data onto the optical disc 22 morereliable, there is a certain defect management mechanism in moreadvanced optical disc specifications. One of the most common ways is toallocate a portion of the optical disc 22 as a spare recording area.Whenever there are defects on an optical disc that make recordingimpossible, the data that is supposed to be recorded in the defectivearea will then be recorded in the spare recording area instead. Thus,the defects will not affect the recording of data on the optical disc22.

[0007] Please refer to FIG. 2. FIG. 2 shows the allocation of sparerecording areas and normal recording areas under the specification ofCD-MRW(Compact Disc-Mount Rainier reWritable). As shown in FIG. 2, thetrack 24 that is used for data recording is divided into several majorareas. These areas include a Lead-In Area (LI), a Program Area (PA), anda Lead-Out Area (LO). The LI and the LO are used respectively formarking the beginning and the end of the tracks 24. The LI comprises onearea as a Main Table Area (MTA) to store a Defect Table (DT). The PA isused to record data. The PA is divided into a pre-gap (P0), a GeneralApplication Area (GAA), a Secondary Table Area (STA) to store a backupcopy of the defect table DT, a plurality of Data Areas (DA), and aplurality of Spare Areas (SA).

[0008] In FIG. 2, different Data Areas (DA) are marked as DA(1), DA(2),. . . all the way to DA (N). There is also a plurality of Spare Areas(SA) in the PA to match the DA, different SA are marked with SA(1),SA(2), . . . to SA(N) respectively. Every DA has a plurality of DataPacket Areas (Pd). Every Pd has a plurality of user data blocks (Bd).Every Bd is used to record one block of data. Similarly, every SA(n) isfurther divided into a plurality of Spare Packet Areas (Ps). Every Pscomprises a plurality of spare data blocks (Bs). To facilitatediscussion later on, there are three data blocks specifically markedBd1, Bd2, and Bd3 and another three spare blocks specifically markedBs1, Bs2, and Bs3 shown in FIG. 2. Whether it is the data block Bd orspare the block Bs, they are all writable data blocks with the same datastorage capacity. For instance, in the specification of CD-MRW, everydata area DA generally has 136 Pd and every packet Pd has 32 user datablocks Bd, every spare area SA has 8 packets Ps and every packet Ps has32 spare blocks Bs. Every user data block Bd and spare area Bs containsroom for 2 k bytes of data respectively.

[0009] In order to manage these data blocks Bd and spare blocks Bs,every data block Bd and spare block Bs has its own address (i.e. PBN,Physical Block Number). On the track 24, the address of each data blockBd and spare block Bs is unique. The value of each address correspondsto the physical order of the Bd, Bs on the track 24. An arrow A1 in theFIG. 2 points from the left to the right, the data area Bd on the lefthand side has smaller address value. For example, in FIG. 2, the addressvalue of the data area Bd is smaller than the address value of the dataarea Bd2 and the address value of data area Bd2 is smaller than that ofBd3, etc. The address value of every data block Bd in the data areaDA(1) is smaller than the address value of a data block Bd in the dataarea DA(2), etc. Similarly, the address value of a spare block Bs1 issmaller than that of Bs2 and the address value of spare block Bs2 issmaller than that of Bs3. The address value of every spare block Bs inthe spare area SA(1) is smaller than the address value of every spareblock in the spare area SA(2).

[0010] We can describe the basic principle of the optical disc 22 defectmanagement as follows. Whenever the optical disc drive 10 needs to writedata from the host 26 (refer to FIG. 1) to the optical disc 22, theoptical disc drive 10 will first write data onto a data block Bd(i) ofthe track 24. If the optical disc drive 10 encounters a defect and cannot record data to the data block Bd(i) correctly, the optical discdrive 10 will find a substitute spare block Bs and write the data thatwas meant to be in this defective data block Bd(i)into the substitutespare block Bs.

[0011] In practice, the address of every defective data block Bd, theaddress of the substituted spare block Bs, and a mapping indicating therelationship is recorded in the defect table DT of the optical disc 22.When the optical disc drive 10 wants to read from the optical disc 22and reaches the defective data block Bd, it locates the correspondingsubstituted spare block Bs via a record in the defect table DT, andreads the data on this substituted spare block Bs. According to theoperational principle described above, even with some defects on theoptical disc 22(caused by scratches or microdust), by setting up andusing spare blocks Bs to implement defect management via the defecttable DT, data can still be recorded on the optical disc 22.

[0012] As described above, the defect table DT records the usage statusof each spare block Bs. Please refer to FIG. 3. FIG. 3 is a sketch mapof the main data structure of the defect table DT in FIG. 2. The defecttable DT has a plurality of Defect Table Blocks (DTB) (different DefectTable Blocks are marked DTB(1), DTB(2) . . . respectively). Each DTB hasa plurality of entries 28. A plurality of DTB can be collected to formone defect table packet, so the DTB in the defect table DT can bedivided into a plurality of defect table packets.

[0013] The total number of DTB in the defect table DT is the same as thenumber of spare areas SA in the track 24. The number of entries 28 ineach DTB is the same as the number of the allocated spare blocks Bs inthe spare area SA. In other words, every entry 28 in the defect table DTmaps to one spare block Bs and records the usage status of this spareblock Bs. Basically, each DTB maps to one spare area SA and every entry28 of DTB is used to record the usage status of one spare block Bs inthe corresponding spare area SA. However, in some special cases, therewill be some entries 28 in the DTB that record a spare block Bs usagestatus of another spare area SA.

[0014] Please refer to FIG. 4A. FIG. 4A is a detailed sketch map of thedata structure of the defect table DT. As shown in FIG. 4A, the dataarea SA(n−1) on the track 24 contains spare block S0. The spare areaSA(n) has spare blocks S1 through S16. The data area DA(n−1) includesdata blocks Dx through Dy. The data area DA(n) includes data blocks D1through D7. In the defect table DT, the data block DTB(n−1) is mainlyused to record the usage status of corresponding spare blocks in thespare area SA(n−1). In every entry 28 that maps to one spare block Bsrecords one status information 29A, one spare block Bs addressinformation 29B, and one data block Bd address information 29C. Thespare block Bs address information 29B records the spare block Bsaddress mapped to this entry. To facilitate further discussion, threeentries are marked 28A, 28B, and 28C respectively in FIG. 4A.

[0015] For each spare block Bs on the track 24, there are threedifferent possibilities. First, a spare block Bs is already used tosubstitute for a defective data block Bd and contains the data that wassupposed to be written onto this defective data block Bd. Second,although the spare block Bs can record data normally, it is not yet usedto substitute for a defective data block Bd. Third, the spare block isdefective and cannot be used to record any data.

[0016] For example, in FIG. 4A, the spare block S0 of the spare packetSA(n−1) and the spare blocks S1, S2,S3,S5,S6,S8,S10, and S11 of thespare packet SA(n) are used as substitutes to record data originallymeant for specific defective data blocks Bd. The entries 28 that wereused to record the usage status of these spare blocks Bs can also becalled “used entries”. The spare blocks Bs that these entries map towere used to substitute for the defective data blocks Bd.

[0017] instance, an entry 28A is used to record the usage status 29A ofthe spare block S5 and the address information 29B of the spare blockS5. If the spare block S5 is used to substitute for a defective datablock D3 for data recording, then the data block address information 29Cof the entry 28A will record the address of the data block D3. Finally,the status information 29A is used to mark the entry 28A as a usedentry. In FIG. 4A, a “U” is used to mark a used entry 28. In practice,the status information 29A is a 4 bit data. Similarly, thecorrespondences of the spare blocks S2, S0, S1, S6, S5, and S3 that areused to substitute for defective data blocks Dx, Dy (which reside in thedata area DA(n−1)), D1, D2, D3, and D7 respectively, are each mapped inused entries 28A. All of the used entries 28A are gathered together andform a group in the record block DTB(n) as shown on FIG. 4A.

[0018] When the optical disc drive 10 tries to access data in adefective data block Bd on the optical disc 22, the optical disc drive10 uses the address of this defective data block Bd to find thecorresponding entry 28A that records the address 29C of this defect datablock Bd. The optical disc drive 10 then uses the address 29B of thecorresponding spare block Bs via this entry to use this spare block Bsto substitute for the original defective data block Bd for dataaccessing.

[0019] The spare blocks S13, S14 to S15, and S16 in FIG. 4A are allnormal recordable spare blocks Bs, but they are not yet used tosubstitute for a defective data block Bd. The entries 28B recording theusage status 29A of these spare blocks Bs are called “free entries”. Forinstance, the entry 28B of the spare block S15 is a free entry. Thespare block address information 29B of the entry 28B will record theaddress of the spare block S15. Because the spare block Bs that maps toa free entry is not yet used to substitute for a defective data blockBd, the data block address information 29C will not record the addressof a specific data block Bd. In FIG. 4A, the status information 29A ismarked with an “F” to indicate that the entry 28B is a free entry. Basedon the same reasoning, the status information 29A of the spare blocksS13, S14, and S16 are also marked with an “F” in the respective entries28B. Similar to the allocation of used entries, in a record blockDTB(n), all of the recordable fre-e entries are also gathered togetherto form a group, as shown in FIG. 4A.

[0020] Just like the data blocks Bd can be damaged and become defectivedata blocks Bd, the spare blocks Bs in the spare area SA can also bedamaged and become defective spare blocks Bs. For instance, in FIG. 4A,spare blocks S4, S7, S9, and S12 are defective spare blocks. Entries 28Cthat are used to record the usage status 29A of the spare blocks S4, S7,S9, and S12 are called unusable entries. For example, the address of thedefective spare block S4 is recorded in the spare block addressinformation 29B of the unusable entry 28C. The defective spare block S4cannot be used to substitute for any defective data block Bd for datarecording, so the data block address information 29C of the data entry28C will not record an address of any specific data block Bd. In FIG.4A, the status information 29A is marked “D” to indicate that the entry28C is an unusable entry. Similarly, the defective spare blocks S7, S9,and S12 are also recorded as unusable entries. For the same record blockDTB, all of the unusable entries 28C are also gathered together to forma group as shown in FIG. 4A.

[0021] From the description above, the usage status 29A of any spareblock Bs is known based on the possible three entries (used, free, andunusable). In order to streamline the process of defect management, theentries of the record block DTB in the defect table DT are sorted. Asdescribed above, the data blocks Bd and the spare blocks Bs all haveaddresses. Every used entry 28 in the defect table is sorted intoascending order by the address of the defective block 29C.

[0022] Take FIG. 4A as an example, the defective data blocks Bd fromleft to right are Dx, Dy, D1, D2, and D3 to D7. The data block Dx hasthe lowest address value, and from left to right the value increases(Dx<Dy<D1<D2< . . . <D7)with the data block D7 having the highestaddress value. The used entries 28A that record the addresses of thesedefective data blocks are also sorted by the address value order ofdefective data blocks Bd. As shown in FIG. 4A, in a data block DTB(n),among all the used entries 28A, the used entry 28A that records theaddress of the data block Dy is arranged at the left hand side of thediagram, and the order of the used entries 28A is according to the orderof the addresses of the data blocks Dy, D1, D2, and D3 to D7. Inpractice, all the used entries 28A in the record block DTB of the defecttable DT will follow the magnitude order of the defective data blockaddress. In other words, in the record block DTB(n−1), of all thedefective data block addresses recorded by the used entries 28A, thehighest address is the rightmost address. In the record block DTB(n),every defective data block address recorded by the used entries 28A willbe higher than the rightmost address in the record block DTB(n−1).

[0023] Compared to the order arrangement of the used entries 28A in thedefect table DT, the order the free entries 28B is based on the spareblock Bs addresses that the free entries 28B record. In FIG. 4A, thespare blocks Bs from left to right are S1, S2, S3 through S14, S15, andS16. The spare block S1 has the lowest address value, and from left toright the value of each address increases (S1<S2<S3< . . . <S14<S15<S16)with the spare block S16 having the highest address value. For the spareblocks S13, S14, S15, and S16 that are not used to substitute fordefective data blocks Bd, the corresponding free entries 28B also followthe same order from left to right as shown in FIG. 4A. Unusable entries28 c do not require any special sorting.

[0024] When the optical disc drive 10 accesses the data block Bd in thedata area DA(n) sequentially, the optical disc drive 10 encounters thedefective data blocks D1, D2 and D3. If the data area DA(n)is arrangedaccording to the address of the defective data block Bd sequence andused entries 28A are sorted as a group, the optical disc drive canretrieve the address of the substituted spare block Bs via the usedentry 28A. Based on the address sequence to arrange the spare blocks Bsand the gathering of the free entries 28A, the optical disc drive 10 canfind free spare blocks 28B to substitute for the defective data blocksBd.

[0025] However, because these three types of entries (used, free, anddefective) are gathered to form groups and sorted differently accordingto their types, the number and position of all the entries 28 in thedefect table DT will change with repeated data accessing. Please referto FIG. 4B (and also FIG. 4A). FIG. 4B shows, if the optical disc 22status changes, how the defect table from FIG. 4A is affected. Supposeduring the operation of data writing, the optical disc drive 10 finds anormal data block B8 on track 24 has become defective (in other words,the data block B8 is normal in FIG. 4A but is defect in FIG. 4B). Theoptical disc drive 10 can no longer write data to the data block B8.Following the defect management principles mentioned earlier, theoptical disc drive 10 searches for a free entry 28B in the defect tableDT to find a free spare block 28A (not used as a substituted block forany defective data block)and locates the spare block S13. Then the spareblock S13 is used to substitute for the defect data block D8.

[0026] After the usage status 29A of the free entry 28B for the spareblock S13 is changed from “free” to “used”, the free entry 28B thatrecords the address of the spare block S13 in the record block DTB(n)will be a used entry. The changed status information 29A from an “F” toa “U” makes the free entry 28B become a “New” used entry 28A. Of course,now there is one less free entry in FIG. 4B than in FIG. 4A.

[0027] As described above, the used entries 28A need to be sorted.Because the address value of the data block B8 is somewhere between thedefective data blocks D1 and D2 the “New” used entry 28A has to be putin between the two used entries 28A that record the defective blocks D1and D2. From this example it can be seen that the order of the usedentries 28A after sorting may be different from the corresponding spareblock Bs sequence arranged on the track 24.

[0028] Furthermore, as shown by FIGS. 4A and 4B, if there are moredefective data blocks Bd in the data area DA(n−1) than the normal spareblocks Bs in the spare area SA(n−1), the spare blocks Bs in the sparearea SA(n) are used. When the used entries 28A are sorted according tothe defective data block Bd addresses, the used entry 28A that recordsthe spare block S2 originally in the spare are SA(n) might be placed inthe record block DTB(n−1) that normally maps to the spare area SA(n−1).Similarly, for the spare block S0 that belongs to the spare areaSA(n−1), the used entry 28A might be moved to the record block DTB(n).In response to the “New” used entry 28A, the defect table DT withchanged content will be rewritten onto the optical disc 22. Afterwards,when the optical disc 10 is accessing data and encounters the defectivedata block B8, from the updated defect table DT it can locate thecorresponding spare block S13.

[0029] From the discussion above, after repeated data accessing, theoptical disc 22 will eventually have defects. The entry number andsequence of the defect table DT will keep changing too. Because the usedentries 28A and the free entries 28B are grouped and sorted within theirrespective groups, the entries 28 used to record the usage status 29A ofthe spare blocks Bs can no longer be arranged sequentially according tothe spare blocks Bs sequence on the track 24. For instance, as mentionedin FIGS. 4A, 4B, even with the spare blocks S12, S13, and S14 onneighboring positions on track 24, the entries 28 used to record theusage status 29A of the spare blocks S12, S13, and S14 will not lineupin neighboring positions and follow the sequence of the spare blocksS12, S13 and S14.

[0030] Even within the used entries 28A of every record block DTB, thespare blocks Bs with neighboring entry 28 records are not necessary theneighboring spare blocks Bs on the track 24. In other words, the defecttable DT based on the spare block usage status 29A cannot reflect theactual sequence of the spare blocks Bs on the track 24.

[0031] If the address of the spare block Bs is needed to refer to theusage status 29A of this spare block Bs, the spare block Bs addressinformation 29B of each spare block Bs in the defect table DT must bechecked one by one to retrieve the status of this spare block Bs via thestatus information 29A from the entry 28. For instance, if the opticaldisc drive 10 encounters one defective spare block Bs in some spare areaSA during optical disc 22 data accessing, the spare block Bs addressinformation 29B of all the unusable entries 28C is checked one by one tofind out if this spare block Bs is already recorded in the defect tableDT as a defective spare block Bs. If this spare block Bs is not recordedas a defective spare block Bs yet, this spare block Bs might be recordedas a spare block Bs in a free entry 28B. Now the usage status 29A of theentry 28B must be changed accordingly. Because there is no way todirectly retrieve the usage status 29A of the spare block Bs simply byaddress, the process of defect management is cumbersome and slow.

SUMMARY OF INVENTION

[0032] The primary objective of the claimed invention is to disclose amethod that can manage the usage status of spare blocks efficiently, andto directly control the usage status of spare blocks according to theaddress of the spare block.

[0033] The claimed invention sets up a status table in addition to adefect table. The status table has a plurality of fields with each fieldmapping to one spare block on the optical disc and is used to record theusage status of that particular spare block. All fields in the statustable are arranged in the same order as the spare blocks they map to onthe optical disc. After the construction of the status table accordingto the claimed invention, the defect distribution density and relatedstatistic data in different data areas and spare areas is easilyavailable, further assisting data accessing on the optical disc.

BRIEF DESCRIPTION OF DRAWINGS

[0034]FIG. 1 is a functional block diagram of a prior art optical discdrive.

[0035]FIG. 2 is a sketch map of the data format on an optical disctrack.

[0036]FIG. 3 is a sketch map of the main data structures of a defecttable of the optical disc track in FIG. 2.

[0037]FIG. 4A is a sketch map of the detailed data structure of thedefect table in FIG. 3.

[0038]FIG. 4B shows how the defect table in FIG. 4a is updated as thestatus of the optical disc changes.

[0039]FIG. 5 is a functional block diagram of an optical disc driveaccording to the present invention.

[0040]FIG. 6 is a sketch map of main data structure in a status tableaccording to the present invention.

[0041]FIG. 7A is a sketch map of the main data structures in the statustable of FIG. 6.

[0042]FIG. 7B shows how a defect table is updated as the status of anoptical disc changes according to the present invention.

DETAILED DESCRIPTION

[0043] Please refer to FIG. 5. FIG. 5 is a functional block diagram of apresent invention optical disc drive 30 with a host 46. The method ofthe present invention can be used with the optical disc drive 30 of FIG.5. With the host 46 (can be a computer system such as a PC), users cancontrol the optical disc drive 30 to access data on an optical disc 22.There is a loader 34 in the optical disc drive 30, one motor 32 thatspins the loader 34, a control circuit 38 that controls the operation ofthe optical disc drive 30, and a memory 40 (for instance, random accessmemory) to temporarily hold the data needed for the control circuit 38during an operational period. When the motor 32 drives the loader 34,the optical disc 22 on the loader 34 rotates and tracks 24 on theoptical disc 22 that are used for recording data will sweep across apick-up head 36. The pick-up head 36 then accesses the data on thetracks 24. The data protocol recorded on the track 24 can be of theCD-MRW specification shown in FIG. 2.

[0044] To control the usage status of all the spare blocks moreefficiently, in addition to an original defect table on the optical disc22, the present invention adds a status table to record the usage statusof all spare blocks according to their sequence order on the track 24.The status table is kept in the memory 40 for use by the control circuit38 and is not necessarily written to the optical disc 22 to retaincompatibility with the CD-MRW protocol.

[0045] Please refer to FIG. 6. FIG. 6 is a sketch map that shows thedata structure of the status table 50 of the present invention mappingwith the spare blocks Bs on the optical disc track 24. In the statustable 50 of the present invention, there are a plurality of fields 52(for easier discussion in the future, nine fields are marked 52A to52I), every field maps to a spare block Bs on the track 24 and recordsthe usage status of that spare block Bs. Most importantly, in thepresent invention, the fields 52 that map to the spare blocks Bscorrespond to the order of the spare blocks Bs on the track 24 andlineup accordingly in the status table 50. As shown in FIG. 6, from leftto right in the diagram, fields 52A, 52B, and 52C in the status table 50map to spare blocks Sa1, Sa2, and Sa3 in spare area SA(1) using the sameorder. The fields 52A and 52B map to the neighboring spare blocks Sa1and Sa2, so they are also in neighboring positions in the status table50. Fields 52D, 52E, and 52F map to spare blocks Sb1, Sb2, and Sb3 inspare area SA(2) respectively and lineup in the status table 50 in thesame order as the spare blocks Sb1, Sb2, and Sb3. The field 52C thatmaps to the last spare block Sa3 in the spare area SA(1)(the one at theleft) will also neighbor the field 52D that maps to the first spareblock Sb1 of the spare area SA(2).

[0046] The same rule applies to the last spare area SA(N) of track 24,fields 52G, 52H, and 52I map to data blocks Sz1, Sz2, and Sz3 and lineupat the last part of the status table 50. Compared to the first field 52Ain the status table 50 (maps to the first spare block Sa1 in the firstspare area SA(1)), the last field 521 in the status table 50 maps to thelast spare block Sz3 on the track 24.

[0047] For further notes on the implementation of the present invention,please refer to FIG. 7A. For easier comparison of the data structuresbetween the status table 50 of the present invention and the defecttable DT, FIG. 7A is a sketch map to show how the status table 50 of thepresent invention is used to record the usage status of the spare blocksBs in FIG. 4A. In a preferred embodiment of the present invention, thefield 52 that maps to one spare block Bs will record whether this spareblock Bs is free, is used to substitute for a defective data block Bd,or if the spare block Bs is defective.

[0048] For instance, the spare block S1 is used to substitute for onedefective data block Bd. A field 54A that maps to the spare block S1records that the spare block S1 is a used spare block Bs. Similarly tothe example in FIG. 4A, FIG. 7A also uses a “U” in the field to showthat the spare block S1 is already used to substitute for a defectivedata block Bd. Similarly, a field 54B to the right of the field 54A mapsto a spare block S2 and records that the spare block S2 is already usedto replace a defective data block Bd.

[0049] On the other hand, a field 54D in the status table 50 that mapsto a defective spare block S4 records that the spare block S4 is adefective spare block Bs and cannot record data. The fields 54 in FIG.7A use a “D” to represent a defective spare block Bs. Similarly, a field54G that maps to a spare block S7 is also marked with “D”, indicatingthat it is also a defective spare block Bs.

[0050] Finally, in FIG. 7A, all the fields 54 that map to a free spareblock Bs (spare blocks Bs that are not defective and are not used tosubstitute any defective data block Bs yet) will have an “F” in thefield representing that the spare block Bs that the field 54 maps to isa free spare block Bs. For instance, fields 54M, 54N, and 54P in thestatus table 50 record that the spare blocks S13, S14, and S16 are allfree spare blocks Bs.

[0051] Please refer to FIG. 7B (and also FIG. 7A). As with thediscussion of FIG. 4A and FIG. 4B above, during the process of dataaccessing on the optical disc 22, the usage status of every spare blockBs might change. The status table 50 of the present invention will beable to update the status change of every spare block Bs. For example,in the transformation of FIG. 4A into FIG. 4B, a data block B8 in FIG.7A used to be functional, but during the process of data accessing onthe optical disc 22, the data block B8 became a defective data block andcannot record data anymore. When the optical disc drive 30 tries towrite data into the data block B8, the optical disc drive 30 discoversthat the data block B8 is defective and will look for a substitute spareblock Bs. If the optical disc drive 30 decides to substitute spare blockS13 for the data block B8, the usage status of the spare block S13 willchange from “free” to “used”. FIG. 7B shows a sketch map for the statustable 50 mapping update.

[0052] Because the spare block S13 maps to a field 54M in the statustable 50, the field 54M was previously marked with an “F” in FIG. 7A (toindicate that the spare block S13 is free). After the spare block S13 inFIG. 7B is used to substitute for the data block B8, the field 54M inthe status table 50 is changed into a “U”, indicating that the spareblock S13 that the field 54M maps to is now used to substitute for adefective data block Bd.

[0053] Even with the change of usage status of the spare block S13, thespare block S13 still maps to the field 54M in the status table 50.Regardless if in FIG. 7A or FIG. 7B, the neighbors of the field 54M arestill fields 54L and 54N, they still map to the spare blocks S12 and S14which are neighbors of the spare block S13. In other words, even withusage status changes of every spare block Bs, the order of theircorresponding fields in the status table 50 is still the same as theorder of the spare blocks Bs on the track 24.

[0054] In practice, in the preferred embodiments of the status table 50of the present invention, every field 54 can be a one byte (8 bits)data, 2 bits can be used to record the usage status of the spare blockBs (total 3 status, “U”, “D” and “F” in FIG. 7A) and the remaining 6bits can be reserved for other related data. For instance, the addressof the substituted defective data block Bs can be recorded in themapping field 54 of the used spare block Bs. In other words, in thefield 54 that maps to a spare block Bs, in addition to recording theusage status of that spare block Bs as used, free, or unusable(defective), the field 54 can also record other related data of thatspare block Bs. Under the circumstance that every field 54 is one byteof data, if there are M spare blocks Bs on the track 24, the statustable 50 of the present invention will be M bytes of data.

[0055] When the optical disc drive 30 (refer to FIG. 5) starts to accessdata on the optical disc 22, the control circuit 38 of the optical discdrive 30 will first read the defect table DT of the optical disc 22 intothe memory 40. In the mean time, the control circuit 38 will constructthe status table 50 of the present invention based on the defect tableDT in the memory 40. For instance, M bytes of the memory 40 is allocatedto store the status table 50, then every field 54 in the status table 50is filled out based on the content of every entry 28 in the defect tableDT.

[0056] In practice, the control circuit 38 can execute a simple program(or use a simple logic circuit) to calculate which byte (field 54) ofthe status table 50 a spare block Bs is mapped to according to theaddress of the spare block Bs, allowing access to the information in thefield 54 in the status table 50. When the optical disc drive 30 startsto access data on the optical disc 22, from the status table 50 theoptical disc drive 30 can find the mapping field 54 according to thespare block Bs address, and can access the data within this field 54.For instance, when the optical disc drive 30 encounters a defectivespare block Bs on the optical disc 22 during data accessing, the controlcircuit 38 determines whether this defective spare block Bs is marked“unusable” in the status table 50 by the address of this defective spareblock Bs. In comparison to the prior art, the optical disc drive 10 hasto check every unusable entry in defect table one by one to know whetherthat defective spare block Bs is marked as defective (unusable) already.

[0057] As the examples shown in FIGS. 7A, 7B (and FIGS. 4A, 4B)demonstrate, in response to events occurring during a data accessingperiod of the optical disc 22, the optical disc drive 30 has to updatethe content of defect table DT and the status table 50 accordingly.Normally, after the optical disc drive 30 reads the defect table DT andstores it temporarily in the memory 40, whenever the defect table DTneeds to be updated, the optical disc drive 30 will only update thedefect table DT in the memory 40. Updating the status table 50 is also afast memory operation.

[0058] After the optical disc drive 30 finishes accessing data on theoptical disc 22 (for instance, the optical disc 22 is to be ejected fromthe optical disc drive 30), the optical disc drive 30 will then writeback the updated defect table DT in the memory 40 to the optical disc 22(writes to the main table area MTA/secondary table area STA, as shown inFIG. 2). Of course, in one embodiment of the present invention, thestatus table 50 of the present invention can also be written into onefixed location on the optical disc track 24. That is, if the statustable 50 of the present invention has been recorded onto the opticaldisc 22 in a prior session, before the optical disc drive 30 starts toaccess the optical disc 22, the optical disc drive 30 can load thestatus table 50 from the optical disc 22 into the memory 40 and updatethe temporary status table 50 in the memory 40 during as needed. If thestatus table 50 is changed during a session, before finishing theoptical disc 22 data accessing, the updated status table 50 will bewritten back onto the optical disc 22.

[0059] With the prior art, only the defect table DT is used to recordthe usage status 29A of every spare block Bs. Because the defect tableDT categorizes every spare block Bs by its individual usage status 29A,it is impossible to quickly determine the usage status 29A of the spareblock Bs simply by using the address of the spare block Bs.

[0060] The status table 50 of the present invention acts as an accessorytool for the defect table DT and records the usage status 29A of everyspare block Bs in the order of the spare blocks Bs on the optical disctrack 24. The usage status 29A of the spare block Bs can be retrievedaccording to the address of the spare block Bs, resulting in a moreefficient defect management mechanism.

[0061] Additionally, from the status table 50 of the present invention,calculating the number of defective blocks and related statistic data ofthe optical disc 22 is quick and it can be used as the basis for opticaldisc 22 data accessing. For instance, the number of defective datablocks on the optical disc 22 (based on the number of used spare block)can quickly be calculated from the status table 50 before the opticaldisc drive 30 accesses data. For an optical disc 22 with fewer defectivedata blocks Bd, the default spin speed of the optical disc drive 30 canbe faster allowing the optical disc drive 30 to access data on theoptical disc 22 at a higher speed. Contrarily, if the optical disc 22has more defective data blocks Bs, the optical disc drive 30 willperform more frequent defect management functions (such as moving thepick-up head to a spare area SA and accessing the data on the spareblocks Bs). In this case, the default speed of optical disc drive 30 canbe lower, so that the optical disc drive 30 can perform more frequentdefect management processing at a slower speed.

[0062] Furthermore, from the status table 50 of the present invention,the distribution status of the used spare block Bs can be calculated. Ifmost of the spare blocks Bs in some spare area SA are used spare blocksBs, the optical disc drive 30 can also read these spare blocks into thememory 40. Because later on during the data accessing process of theoptical disc 22, the optical disc 22 is very likely to access thesespare blocks Bs to perform a defect management function. If these sparedata blocks Bs are read into the memory 40 beforehand, the pick-up headneeds not move on the track 24 to access these spare blocks Bs. Inconclusion, by using the status table 50 of the present invention, theinadequateness of the defect table is overcome and the processes ofoptical disc data accessing and defect management are more efficient.

[0063] Described above is only the preferred embodiments of the presentinvention. Those skilled in the art will readily observe that numerousmodifications and alterations of the device may be made while retainingthe teachings of the invention. Accordingly, the above disclosure shouldbe construed as limited only by the metes and bounds of the appendedclaims.

What is claimed is:
 1. A method for managing data of an optical disc,the optical disc comprising a plurality of data blocks and a pluralityof spare blocks arranged in order, each of the data blocks being used torecord data, and each of the spare blocks being capable of replacing acorresponding defective data block to record data, the methodcomprising: establishing a status table, wherein the status tablecomprises a plurality of columns arranged in order, and each of thecolumns is used to record a status of a corresponding spare block; andrecording the statuses of the spare blocks in the status table accordingto the arranging order of the spare blocks.
 2. The method of claim 1wherein when the statuses of a first spare block, of a second spareblock, and of a third spare block are respectively recorded in a firstcolumn, a second column, and a third column, the second column islocated between the first column and the third column, the status of thefirst spare block is the same as the status of the third spare block,and there is not any data block located between the first spare blockand the third spare block, when recording the statuses of the spareblocks in the status table, if the status of the second spare block ischanged, the changed status of the second spare block is recorded in oneof the columns, which is located between the first column and the thirdcolumn.
 3. The method of claim 1 wherein each of the spare blocks couldbe determined whether the spare block is defective according to the datarecorded in the columns.
 4. The method of claim 1 wherein each of thespare blocks could be determined whether the spare block has been usedto replace a corresponding defective data block according to the datarecorded in the columns.
 5. The method of claim 1 for an optical discdrive wherein the optical disc drive comprises a memory for storing thestatus table while the status table is established.
 6. The method ofclaim 1 wherein there is a defective second spare block located betweena first spare block and a third spare block, the first spare block andthe third spare block are not defective, and there is not any data blocklocated between the first spare block and the third spare block, whenrecording the statuses of the spare blocks in the status table, thestatuses of the first spare block, of the second spare block, and of thethird spare block are respectively recorded in a first column, a secondcolumn, and a third column, wherein the second column is located betweenthe first column and the third column.